home *** CD-ROM | disk | FTP | other *** search
/ Aminet 25 / Aminet 25 (1998)(GTI - Schatztruhe)[!][Jun 1998].iso / Aminet / dev / amos / AMOS0398.lzh / AMOSLIST / 000154_amos-request@svcs1.digex.net_Mon Mar 16 15:12:39 1998.msg < prev    next >
Text File  |  1998-04-01  |  2KB  |  53 lines

  1. >From amos-request@svcs1.digex.net  Mon Mar 16 15:12:39 1998
  2. Received: from svcs1.digex.net (svcs1.digex.net [204.91.197.224])
  3.     by pony-1.mail.digex.net (8.8.8/8.8.8) with ESMTP id PAA12469
  4.     for <mcox@access.digex.net>; Mon, 16 Mar 1998 15:12:38 -0500 (EST)
  5. Received: (from daemon@localhost)
  6.     by svcs1.digex.net (8.8.5/8.8.5) id MAA27741
  7.     for amos-out; Mon, 16 Mar 1998 12:04:46 -0500 (EST)
  8. Received: from pony-1.mail.digex.net (pony-1.mail.digex.net [204.91.241.5])
  9.     by svcs1.digex.net (8.8.5/8.8.5) with ESMTP id MAA27738
  10.     for <amos-list@svcs1.digex.net>; Mon, 16 Mar 1998 12:04:45 -0500 (EST)
  11. Received: from hermes.clara.net (hermes.clara.net [195.8.69.6])
  12.     by pony-1.mail.digex.net (8.8.8/8.8.8) with ESMTP id MAA14805
  13.     for <amos-list@access.digex.net>; Mon, 16 Mar 1998 12:04:44 -0500 (EST)
  14. Received: from mail.clara.net (du-622.claranet.co.uk [195.8.75.150]) by hermes.clara.net (8.8.5/8.8.5) with SMTP id RAA08368 for <amos-list@access.digex.net>; Mon, 16 Mar 1998 17:04:37 GMT
  15. Date: Mon, 16 Mar 1998 17:04:37 GMT
  16. Message-Id: <199803161704.RAA08368@hermes.clara.net>
  17. From: Nathan Reynolds <nsl@clara.co.uk>
  18. To: amos-list@access.digex.net
  19. Subject: Re[3]: Sorting problems
  20. MIME-Version: 1.0
  21. Content-Type: text/plain
  22. Content-Transfer-Encoding: 7bit
  23. X-Mailer: Becky! ver 1.08
  24. Status: O
  25. X-Status: 
  26.  
  27. If you used your own sorting technique rather than the one built into
  28. AMOS, things will be easier.  With 128 blocks the speed difference shouldn't
  29. really matter.
  30.  
  31. Here's a code fragment for you to mess around with.
  32. I'm typing this straight from my head, so it isn't tested.
  33.  
  34. For FOO=1 To 128
  35.   For FOO2=1 to 128
  36.     If NAME$(FOO)<NAME$(FOO2) And FOO<>FOO2
  37.       Swap NAME$(FOO),NAME$(FOO2)
  38.       Swap BANKNUM(FOO),BANKNUM(FOO2)
  39.     EndIf
  40.   Next
  41. Next
  42.  
  43. As well as the NAME$() array, I've also added a BANKNUM array which
  44. relates to NAME$() to tell you which bank has which name.
  45.  
  46. You may be able to get a better sorting algorithm yourself.
  47. Oh, and I'm not sure if the logic in the If statement is correct.  You
  48. may have to adjust it to NAME$(FOO)>NAME$(FOO2).
  49.  
  50. Maybe I'll be able to do more when I get the source.
  51.  
  52. Hope it works,
  53.               Nath.